Industrial controllers are special purpose computers used for controlling industrial processes or manufacturing equipment.
Under the direction of a stored program, the industrial controller examines a series of inputs reflecting the status of a controlled process and changes outputs affecting control of the process. The inputs and outputs are mostly binary, that is "ON" or "OFF"; however, analog inputs and outputs, taking on a continuous range of values and multibit digital values are also used.
Industrial controllers are frequently programmed in "relay ladder" language where instructions are represented graphically by "contacts" and "coils" of virtual relays connected and arranged in ladder-like rungs across a power and ground rail. This relay ladder language, with its input contacts and output coils, reflects the emphasis in industrial control on the processing of large amounts of input and output data.
Relay ladder language also reflects the fact that most industrial control is "real-time"; that is, an ideal industrial controller behaves as if it were actually composed of multiple relays connected in parallel rungs to provide outputs in essentially instantaneous response to changing inputs.
In a typical relay ladder logic program, the rungs composed of contacts and output coils are evaluated in sequence from the first to the last rung and then this process is repeated. At each rung, inputs represented by the contacts are read from memory (as obtained from inputs from the controlled process or the previous evaluation of coils of other rungs). These inputs are evaluated according to the logic reflected in the connection of the contacts into one or more branches within the rungs. Contacts in series across a rung represent a Boolean AND logic whereas contacts in different branches and thus in parallel across the rung represent Boolean OR logic. Special "normally closed" contacts provide Boolean NOT logic.
Typically, a single output coil at the end of each rung is set or reset based on the evaluation of that rung and this setting or resetting is reflected in the writing to memory of a bit (which ultimately becomes an output to the industrial process).
Once the given rung is evaluated, the next rung is evaluated and so forth. In the simplest form of relay ladder logic programming, there are no jumps, i.e. all rungs are evaluated in a cycle or "scan" through the rungs. For this reason, the execution time of the program is relatively constant on a scan-to-scan basis. This is in contrast to conventional computer programming, where branch and jump instructions cause later instructions or groups of instructions to be skipped depending on the outcome of a test associated with those branch or Jump instructions.
The amount of time required to complete one scan ("scan time") is an important measure of system performance. Generally, the scan time affects how quickly the controller can respond to an input from the controlled process. In simple relay ladder logic programming, the scan time of the program will depend on how many rungs there are in the relay ladder logic program.
In complex control systems, the relay ladder logic program may have many rungs and require a relatively long scan time with the result that response time of the control system is significantly slowed.